Optimal. Leaf size=80 \[ -\frac{3 a b^2 \sin (c+d x)}{d}+\frac{(a-b)^3 \log (\sin (c+d x)+1)}{2 d}-\frac{(a+b)^3 \log (1-\sin (c+d x))}{2 d}-\frac{b^3 \sin ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.105492, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {2668, 702, 633, 31} \[ -\frac{3 a b^2 \sin (c+d x)}{d}+\frac{(a-b)^3 \log (\sin (c+d x)+1)}{2 d}-\frac{(a+b)^3 \log (1-\sin (c+d x))}{2 d}-\frac{b^3 \sin ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2668
Rule 702
Rule 633
Rule 31
Rubi steps
\begin{align*} \int \sec (c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^3}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (-3 a-x+\frac{a^3+3 a b^2+\left (3 a^2+b^2\right ) x}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac{3 a b^2 \sin (c+d x)}{d}-\frac{b^3 \sin ^2(c+d x)}{2 d}+\frac{b \operatorname{Subst}\left (\int \frac{a^3+3 a b^2+\left (3 a^2+b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac{3 a b^2 \sin (c+d x)}{d}-\frac{b^3 \sin ^2(c+d x)}{2 d}-\frac{(a-b)^3 \operatorname{Subst}\left (\int \frac{1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac{(a+b)^3 \operatorname{Subst}\left (\int \frac{1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac{(a+b)^3 \log (1-\sin (c+d x))}{2 d}+\frac{(a-b)^3 \log (1+\sin (c+d x))}{2 d}-\frac{3 a b^2 \sin (c+d x)}{d}-\frac{b^3 \sin ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.118111, size = 67, normalized size = 0.84 \[ -\frac{6 a b^2 \sin (c+d x)+(a-b)^3 (-\log (\sin (c+d x)+1))+(a+b)^3 \log (1-\sin (c+d x))+b^3 \sin ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 108, normalized size = 1.4 \begin{align*}{\frac{{a}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-3\,{\frac{{a}^{2}b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-3\,{\frac{a{b}^{2}\sin \left ( dx+c \right ) }{d}}+3\,{\frac{a{b}^{2}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-{\frac{{b}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{{b}^{3}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.945462, size = 123, normalized size = 1.54 \begin{align*} -\frac{b^{3} \sin \left (d x + c\right )^{2} + 6 \, a b^{2} \sin \left (d x + c\right ) -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) +{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.44291, size = 221, normalized size = 2.76 \begin{align*} \frac{b^{3} \cos \left (d x + c\right )^{2} - 6 \, a b^{2} \sin \left (d x + c\right ) +{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (c + d x \right )}\right )^{3} \sec{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14519, size = 126, normalized size = 1.58 \begin{align*} -\frac{b^{3} \sin \left (d x + c\right )^{2} + 6 \, a b^{2} \sin \left (d x + c\right ) -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) +{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]